package com.fwj.designmodelexample.observeddemo;

/**
 * @author stone.feng
 * @since 2019-03-04
 */
public class Master implements Observer {

    private String name = "主人";

    public Master(Cat cat) {
        cat.addObserver(this);
    }

    @Override
    public void response() {
        System.out.println(name + "被吵醒了");
    }
}
